package Test1224;

public class Test05 {
    public static void main(String[] args) {
        // 找出arr中的最大值
        int[] arr = {6, 1, 7, 4, 3};
        int x = arr[0];
        for (int i = 1; i < arr.length; i++) {
            if (arr[i] > x) {
                x = arr[i];
            System.out.println("最大值是："+x);
        }
        }
    }
}




